import Home from "../views/Home"
import { lazy } from "react"
const routes = [{
    path: '/home',
    component: Home,
    children: [{
        path: '/home/homepage',
        component: lazy(() => import('../views/home/Homepage')),
        text: "首页"
    },
    {
        path: '/home/Classifi',
        component: lazy(() => import('../views/home/Classifi')),
        text: "分类"
    },
    {
        path: '/home/shoppingCart',
        component: lazy(() => import('../views/home/ShoppingCart')),
        text: "购物车"
    },
    {
        path: '/home/my',
        component: lazy(() => import('../views/home/My')),
        text: "我的"
    },
    ]

},
{
    path: '/details',
    component: lazy(() => import('../views/Details'))
},
{
    path: '/login',
    component: lazy(() => import('../views/Login'))
},
{
    path: '/',
    redirect: '/home/homepage',  // 重定向:重新指向其它path,会改变网址
}

]
export default routes